package customer_relation_manage;

import java.util.LinkedList;

public class LookOver {
	/*
	 * 查看类，实现查看，包括有参查看和无参查看
	 */
	//有参查看，根据name进行查找
	public static void check(String name){
		if (!Init.clist.isEmpty()) {
			int length = Init.clist.size();
			for (int i = 0; i < length; i++) {
				if (name.equals(Init.clist.get(i).getName())) {
					System.out.println("ID:"+Init.clist.get(i).getID()+",name:"+
							Init.clist.get(i).getName()+",sex:"+Init.clist.get(i).getSex()+",birthday:"+
							Init.clist.get(i).getBirthday()+",address:"+Init.clist.get(i).getAddress()+
							",call:"+Init.clist.get(i).getCall());
					
				}
//				else {
//					System.out.println("the customer is not exit");
//				}
				
			}
		}else {
			System.out.println("there is no customer");	
		}	
	}
	
	public static void check() {
		if (!Init.clist.isEmpty()){
			for (int i = 0; i < Init.clist.size(); i++) {
				System.out.println("ID:"+Init.clist.get(i).getID()+",name:"+
						Init.clist.get(i).getName()+",sex:"+Init.clist.get(i).getSex()+",birthday:"+
						Init.clist.get(i).getBirthday()+",address:"+Init.clist.get(i).getAddress()+
						",call:"+Init.clist.get(i).getCall());				
			}
		}else {
			System.out.println("there is no customer");
		}
		
	}
	


	
}
